/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * TestJPanel.java
 *
 * Created on 21 mai 2013, 16:51:41
 */

package Vue;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JTextField;
import javax.swing.GroupLayout;
import javax.swing.JLabel;
import javax.swing.LayoutStyle.ComponentPlacement;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

/**
 *
 * @author yannick.henriet
 */
public class IHM_passform extends javax.swing.JPanel {
	private JTextField textField;
	private JLabel lblNumroCarteBleue;
	private JLabel lblSaisieInformationUtilisateur;
	private JButton btnNewButton;

    /** Creates new form TestJPanel */
    public IHM_passform() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        
        textField = new JTextField();
        textField.setColumns(10);
        
        lblNumroCarteBleue = new JLabel("Num\u00E9ro carte bleue");
        lblNumroCarteBleue.setFont(new Font("Tahoma", Font.PLAIN, 22));
        
        lblSaisieInformationUtilisateur = new JLabel("Saisie information utilisateur temporaire");
        lblSaisieInformationUtilisateur.setFont(new Font("Tahoma", Font.PLAIN, 24));
        
        btnNewButton = new JButton("Valider");
        btnNewButton.addMouseListener(new MouseAdapter() {
        	@Override
        	public void mouseClicked(MouseEvent arg0) {
        		Control_IHM_user.getInstance().usrpoub.setNum_cb(textField.getText());
        		Control_IHM_user.getInstance().choixSelection("insert_temp"); // appel de la fonction de choix
        	}
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        layout.setHorizontalGroup(
        	layout.createParallelGroup(Alignment.LEADING)
        		.addGroup(layout.createSequentialGroup()
        			.addContainerGap()
        			.addGroup(layout.createParallelGroup(Alignment.LEADING)
        				.addGroup(layout.createParallelGroup(Alignment.TRAILING)
        					.addGroup(layout.createSequentialGroup()
        						.addComponent(lblNumroCarteBleue, GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE)
        						.addPreferredGap(ComponentPlacement.RELATED)
        						.addComponent(textField, GroupLayout.PREFERRED_SIZE, 176, GroupLayout.PREFERRED_SIZE)
        						.addGap(24))
        					.addGroup(layout.createSequentialGroup()
        						.addComponent(lblSaisieInformationUtilisateur)
        						.addContainerGap(17, Short.MAX_VALUE)))
        				.addGroup(Alignment.TRAILING, layout.createSequentialGroup()
        					.addComponent(btnNewButton, GroupLayout.PREFERRED_SIZE, 104, GroupLayout.PREFERRED_SIZE)
        					.addGap(164))))
        );
        layout.setVerticalGroup(
        	layout.createParallelGroup(Alignment.LEADING)
        		.addGroup(layout.createSequentialGroup()
        			.addGap(33)
        			.addComponent(lblSaisieInformationUtilisateur)
        			.addGap(99)
        			.addGroup(layout.createParallelGroup(Alignment.LEADING)
        				.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
        				.addComponent(lblNumroCarteBleue, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE))
        			.addPreferredGap(ComponentPlacement.RELATED, 40, Short.MAX_VALUE)
        			.addComponent(btnNewButton, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)
        			.addGap(40))
        );
        this.setLayout(layout);
    }// </editor-fold>//GEN-END:initComponents
    // End of variables declaration//GEN-END:variables

}
